<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">

<h:head>
	<title>Regala Gift List</title>
</h:head>

<h:body>
<div id="spaziatura">
<full_page id="main">
	<!-- 		HEADER -->
			<div>
						<img src="../resources/Images/Banner.png" id="bannerTop"></img>
			</div>
			<!-- 		HEADER -->
			<div>
						<img src="../resources/Images/Banner_piccolo.png" id="bannerBottom_sx"></img>
			</div>

			<div>
						<img src="../resources/Images/Logo_td_big.png" id="logoTD"></img>
			</div>

			<div>
						<img src="../resources/Images/Banner_piccolo_dx.png" id="bannerBottom_dx"></img>
			</div>
			
			<div>
						<img src="../resources/Images/Bg.png" id="background"></img>
			</div>
			
			
			
		<!--TITOLO E SOTTOTITOLO-->
		<title_box>
		<title_TD>TravelDream</title_TD>
		</title_box>
		<!--FINE TITOLO E SOTTOTITOLO-->

		    <box_login>
				<yellow_text id="topRightReg">User Section</yellow_text>
      		</box_login>
      		

      	<full_page id="menuTop_con_banner">
      	<!-- 	MENUBAR -->

	<p:menubar autoDisplay="false">
			<p:menuitem value="Compra Pacchetto Predefinito" url="SelPacchettoPred.xhtml"/>
		<p:submenu label="Crea Pacchetto Personalizzato">
			<p:menuitem value="Parti da un pacchetto predefinito" url="PPers.xhtml"/>
			<p:menuitem value="Parti da zero" url="creaPPers.xhtml"/>
		</p:submenu>
			<p:menuitem value="Pacchetti Acquistati" url="ViewPacComprato.xhtml"/>
			<p:menuitem value="Gift List" url="ViewPacGL.xhtml"/>
			<p:menuitem value="Fai Un Regalo!" url="regalaGL.xhtml"/>
			<p:menuitem value="Home" url="index.xhtml"/>
	</p:menubar>
	
<!-- 	MENUBAR -->
<yellow_text id="sceglipacchetto">Scegli il tuo pacchetto #{userBean.name}!</yellow_text>

</full_page>

</full_page>

</div>


<div id="spaziatura">
	<h:form id="regGL" >
		<p:growl id="growl" showDetail="true" sticky="true" /> 
		<p:panel id="search" header="Trova GiftList">  
  	      	<h:panelGrid columns="3">  
    	        <yellow_text>Inserisci il codice Gift List</yellow_text> 
        	    <p:inputText value="#{GiftGL.codiceGiftList}" required="true" label="Codice" type="number"/>  
        		<p:commandButton  value="Vai!" action="#{GiftGL.cercaGiftList}" update="growl"/>
        	</h:panelGrid>  
  
        	
        	   
    	</p:panel>
    	
    <p:dialog header="Dettagli GiftList" widgetVar="infoDialog" resizable="true"
			id="infoDlg" showEffect="fade" hideEffect="explode" modal="true"
			 width="90%" height="450px">
			<h:panelGrid id="display" columns="2" cellpadding="4"
				style="margin:0 auto;">
				<h:outputText value="Nome Pacchetto:" />
				<h:outputText value="#{GiftGL.pacchettoGiftList.nome}"
					style="font-weight:bold" />

				<h:outputText value="Città:" />
				<h:outputText value="#{GiftGL.pacchettoGiftList.citta}"
					style="font-weight:bold" />

				<h:outputText value="Data Partenza:" />
				<h:outputText value="#{GiftGL.pacchettoGiftList.data_Partenza}"
					style="font-weight:bold" />

				<h:outputText value="Data Ritorno:" />
				<h:outputText value="#{GiftGL.pacchettoGiftList.data_Ritorno}"
					style="font-weight:bold" />

				<h:outputText value="Prezzo:" />
				<h:outputText value="#{GiftGL.pacchettoGiftList.prezzo}"
					style="font-weight:bold" />
					
				<h:outputText value="Escursioni:" />
				<p:dataList value="#{GiftGL.listaEscursione}" var="esc" itemType="circle">  
                 <b>Nome:</b> #{esc.nomeEscursione}; <b>Partenza:</b> #{esc.cittaP}; <b>Luogo:</b> #{esc.cittaE}; <b>Mezzo:</b> #{esc.mezzo}
                </p:dataList> 	
                
                <h:outputText value="Andata:" />
				<h:outputText value="#{GiftGL.mezzoAndata.tipo} #{GiftGL.mezzoAndata.luogoPartenza}-#{GiftGL.mezzoAndata.luogoArrivo} delle #{GiftGL.mezzoAndata.oraPartenza}"
					style="font-weight:bold" />
                
                <h:outputText value="Ritorno:" />
				<h:outputText value="#{GiftGL.mezzoRitorno.tipo} #{GiftGL.mezzoRitorno.luogoPartenza}-#{GiftGL.mezzoRitorno.luogoArrivo} delle #{GiftGL.mezzoRitorno.oraPartenza}"
					style="font-weight:bold" />
					
				<h:outputText value="Hotel:" />
				<h:outputText value="#{GiftGL.hotelPacchetto.nomeHotel} sito in: #{GiftGL.hotelPacchetto.indirizzo} Stelle: #{GiftGL.hotelPacchetto.stelle}"
					style="font-weight:bold" />
					
			     
				<h:outputText value="Numero di persone:" />
				<h:outputText value="#{GiftGL.pacchettoGiftList.numPren}"
					style="font-weight:bold" />            
			
				<h:outputText value="A nome di:" />
				<h:outputText value="#{GiftGL.pacchettoGiftList.email}"
					style="font-weight:bold" />
				
				<h:outputText value="Paga intero viaggio, Euro #{GiftGL.pacchettoGiftList.prezzo}" />
				   <p:selectBooleanButton value="#{GiftGL.pacchettoGiftList.pagatoPacchetto}" offLabel="Paga!" onLabel="Pagato" offIcon="ui-icon-check" 
				   onIcon="ui-icon-close"  disabled="#{GiftGL.pacchettoGiftList.pagatoPacchetto}"/> 
           
				   
				<h:outputText value="Paga Hotel, Euro #{GiftGL.pacchettoGiftList.prezzoHotel}:" />
				   <p:selectBooleanButton value="#{GiftGL.pacchettoGiftList.pagatoHotel}" offLabel="Paga!" onLabel="Pagato" offIcon="ui-icon-check" 
				   onIcon="ui-icon-close"  disabled="#{GiftGL.pacchettoGiftList.pagatoHotel}"/> 
           
				
				<h:outputText value="Paga Mezzi di trasporto, Euro #{GiftGL.pacchettoGiftList.prezzoMezzo}:" />
				  <p:selectBooleanButton value="#{GiftGL.pacchettoGiftList.pagatoMezzo}" offLabel="Paga!" onLabel="Pagato" offIcon="ui-icon-check" 
				   onIcon="ui-icon-close"  disabled="#{GiftGL.pacchettoGiftList.pagatoMezzo}"/> 
           
				
				<h:outputText value="Paga le escursioni, Euro #{GiftGL.pacchettoGiftList.prezzoEscursione}:" />
				   <p:selectBooleanButton value="#{GiftGL.pacchettoGiftList.pagatoEscursione}" offLabel="Paga!" onLabel="Pagato" offIcon="ui-icon-check" 
				   onIcon="ui-icon-close"  disabled="#{GiftGL.pacchettoGiftList.pagatoEscursione}"/>
           
               <p:commandButton id="pagaButton" value="Effettua pagamento!" oncomplete="PF('confirm').show()" icon="ui-icon-check" title="View">  
               </p:commandButton>

			</h:panelGrid>
		</p:dialog>
		
		<p:dialog header="Conferma Pagamenti" widgetVar="confirm" resizable="false"
			id="conferma" showEffect="fade" hideEffect="explode" modal="true">
			
			Procedere col pagamento?
			
			 <p:commandButton id="pagaButtonConfSI" value="SI!" icon="ui-icon-check" title="View" action="#{GiftGL.pagaSI()}"/>  
             <p:commandButton id="pagaButtonConfNO" value="NO!" icon="ui-icon-check" title="View" action="#{GiftGL.pagaNO()}"/>  
		</p:dialog>

	</h:form>
</div>
<h:outputStylesheet library="css" name="css_rules_plain_links.css" />
</h:body>
</html>